import {getStore} from '@/util/store'
import website from '@/config/website'

export default {
  language: getStore({name: 'language'}) || 'zh',
  menuId: getStore({name: 'menuId'}) || '',
  isCollapse: false,
  isFullScren: false,
  isShade: false,
  screen: -1,
  isLock: getStore({name: 'isLock'}) || false,
  showTag: true,
  showDebug: true,
  showCollapse: true,
  showSearch: true,
  showLock: true,
  showFullScren: true,
  showTheme: true,
  showMenu: true,
  showColor: true,
  colorName: getStore({name: 'colorName'}) || '#409EFF',
  themeName: getStore({name: 'themeName'}) || 'theme-default',
  lockPasswd: getStore({name: 'lockPasswd'}) || '',
  website: website,
  leftMenu: getStore({name: 'leftMenu'}) || {
    name: '首页',
    source: 'el-icon-menu'
  },
  Menu2: getStore({name: 'MENU2'}) || '',
  producActive: getStore({name: 'PRODUCT_ACTIVE'}) || '',
  template: getStore({name: 'TEMPLATE'}) || false,
  emailList: getStore({name: 'EMAILLIST'}) || [],
  labelList: getStore({name: 'LABELLIST'}) || [],
  labelListTag: getStore({name: 'LABELLISTTAG'}) || [
    {
      value: '-1',
      label: '已读',
    },
    {
      value: '-2',
      label: '全部设为已读',
    },
    {
      value: '-3',
      label: '标记为',
    },
    {
      value: '-4',
      label: '标记为',
    },
  ],
  currentEmail: getStore({name: 'CURRENTEMAIL'}) || '',
  defaultActive: getStore({name: 'ACTIVEDEFAULT'}) || '',
  topFrag: getStore({name: 'TOPFRAG'}) || -1,
  commonUnits: getStore({name: 'COMMONUNITS'}) || [],//全部字典
  currencyUnits: getStore({name: 'CURRENCYUNITS'}) || [], //币种
  labelID: getStore({name: 'LABELID'}) || '', //标签ID
  isFrag: getStore({name: 'ISFRAG'}) || 0,//初始化邮件选中样式
  columnList: [
    {title: '[英文名称]', english: 'Product EName', column: 'productEname'},
    {title: '[中文名称]', english: 'Product Name', column: 'productName'},
    {title: '[产品型号]', english: 'Product Model', column: 'productModel'},
    {title: '[规格名称]', english: 'Product Specification', column: 'productSpecification'},
    {title: '[产品类型]', english: 'Product Type', column: 'productTypeName'},
    {title: '[产品图片]', english: 'Product Image', column: 'defaultPicUrl'},
    {title: '[最小起订量]', english: 'Minimum Order Quantity', column: 'minimum', unit: 'productUnitName'},
    {title: '[计量单位]', english: 'Product UnitName', column: 'productUnitName'},
    {title: '[海关编码]', english: 'Hs Code', column: 'hsCode'},
    {
      title: '[离岸价]',
      english: 'Free On Board',
      column: 'productSpec.offshorePrice',
      unit: 'productSpec.offshoreCurrencyUnitName'
    },
    {
      title: '[产品单价]',
      english: 'Unit Price',
      column: 'productSpec.unitPrice',
      unit: 'productSpec.unitPriceCurrencyName'
    },
    {
      title: '[样品价格]',
      english: 'Sample and Price',
      column: 'productSpec.samplePrice',
      unit: 'productSpec.unitPriceCurrencyName'
    },
    {title: '[样品数量]', english: 'Sample and Number', column: 'productSpec.sampleNumber', unit: 'productUnitName'},
    {
      title: '[一档价格]',
      english: 'First gear Price',
      column: 'productSpec.firstPrice',
      unit: 'productSpec.unitPriceCurrencyName'
    },
    {title: '[一档数量]', english: 'First gear  Number', column: 'productSpec.firstNumber', unit: 'productUnitName'},
    {
      title: '[二档价格]',
      english: 'Second gear Price',
      column: 'productSpec.secondPrice',
      unit: 'productSpec.unitPriceCurrencyName'
    },
    {title: '[二档数量]', english: 'Second gear Number', column: 'productSpec.secondNumber', unit: 'productUnitName'},
    {title: '[包装体积]', english: 'Packaging Volume', column: 'productSpec.packageVolume', unitDemo: 'm³'},
    {
      title: '[每包装产品数]',
      english: 'Number of products per package',
      column: 'productSpec.packageNumber',
      unit: 'productUnitName'
    },
    {
      title: '[包装单位]',
      english: 'Packing Unit',
      column: 'productSpec.packingUnitName',
    },
    {
      title: '[包装毛重]',
      english: 'The Packing Gross Weight',
      column: 'productSpec.packagingGrossWeight',
      unitDemo: 'Kg'
    },
    {title: '[产品净重]', english: 'The Packing Net Weight', column: 'productSpec.productWeight', unitDemo: 'Kg'},
    {title: '[外箱长度]', english: 'Packaging outerBoxLong', column: 'productSpec.outerBoxLong', unitDemo: 'cm'},
    {title: '[外箱宽度]', english: 'Packaging outerBoxWidth', column: 'productSpec.outerBoxWidth', unitDemo: 'cm'},
    {title: '[外箱高度]', english: 'Packaging outerBoxHigh', column: 'productSpec.outerBoxHigh', unitDemo: 'cm'},
    {title: '[包装说明]', english: 'Product packageInstruction', column: 'productSpec.packageInstruction'},
  ],
  messageList: getStore({name: 'MESSAGElIST'}) || [], // 未读消息集合
  total: getStore({name: 'TOAL'}) || '', // 消息总数
  currentSetFrag: getStore({name: 'CURRENTSETFRAG'}) || 'first',//当前设置选中
  isFirstEmail: getStore({name: 'FIRSTEMAIL'}) || false,//是否第一次使用营销  - 初始化true - 是第一次
  isFirstSocial: getStore({name: 'FIRSTSOCIAL'}) || false,//是否第一次使用营销  - 初始化true
  emailPage: getStore({name: 'EMAILPAGE'}) || 1,//邮件页码
  emailPageSize: getStore({name: 'EMAILPAGESIZE'}) || 20,//邮件页数量
  commonPage: getStore({name: 'COMMONPAGE'}) || 1,//常规页码
  commonPageSize: getStore({name: 'COMMONPAGESIZE'}) || 20,//常规页数量
  isExpired: getStore({name: 'ISEXPIRED'}) || false,//是否过期

  // 客户公共资源
  turnoverOptions: getStore({name: 'TURNOVER_OPTIONS'}) || [], // 营业额
  companyTypeOptions: getStore({name: 'COMPANY_TYPE_OPTIONS'}) || [], // 公司类型
  industryOptions: getStore({name: 'INDUSTRY_OPTIONS'}) || [], // 行业分类
  socialOptions: getStore({name: 'SOCIAL_OPTIONS'}) || [], // 社交网络
  empleOptions: getStore({name: 'EMPLE_OPTIONS'}) || [], // 雇员人数
  countryOptions: getStore({name: 'COUNTRY_OPTIONS'}) || [], // 国家城市
  sign: getStore({name: 'SIGNLIST'}) || '', // 默认签名
  // 多标签栏问题
  openTab: [], // 所有打开的路由
  activeIndex: '/mail/index', //激活状态
  //邮件 - 客户
  emailMainFrag: getStore({name: 'EMAILMAINFRAG'}) || 1,
  newCount: getStore({name: 'NEW_COUNT'}) || {mail: 0, system: 0, audit: 0, custimp: 0},
  approvalState: getStore({name: 'APPROVALSTATE'}) || true,//审批who
  approvalExamState: getStore({name: 'APPROVALEXAMSTATE'}) || 'wait',//由我审批
  //社交
  socialFrag: getStore({name: 'SOCIALFRAG'}) || true,
  //进度
  percent: [],
  //邮件集合 - 收件箱
  emailListTab: getStore({name: 'EMAILLISTTAB'}) || {
    list: [{
      id: '0',
      title: '收件箱',
      state: 0,
      close: false
    }],
    current: '0'
  },
  //未读邮件
  emailListUnreadTab: getStore({name: 'EMAILLISTUNREADTAB'}) || {
    list: [{
      id: '0',
      title: '未读邮件',
      state: 0,
      close: false
    }],
    current: '0'
  },
  //待处理
  emailListPendingTab: getStore({name: 'EMAILLISTPENDINGTAB'}) || {
    list: [{
      id: '0',
      title: '待处理邮件',
      state: 0,
      close: false
    }],
    current: '0'
  },
  // 已发送
  emailListOutTab: getStore({name: 'EMAILLISTOUTTAB'}) || {
    list: [{
      id: '0',
      title: '已发送',
      state: 0,
      close: false
    }],
    current: '0'
  },
  // 客户模式 - 邮件查看
  emailListCustomerTab: getStore({name: 'EMAILLISTCUSTOMERTAB'}) || {
    list: [{
      id: '0',
      title: '邮件列表',
      state: 0,
      close: false
    }],
    current: '0'
  },
  // 下属客户 - 邮件查看
  emailListNextTab: getStore({name: 'EMAILLISTNEXTTAB'}) || {
    list: [{
      id: '0',
      title: '下属邮件列表',
      state: 0,
      close: false
    }],
    current: '0'
  },
  currentProductID: getStore({name: 'CURRENTPRODUCTID'}) || '',//产品目录ID
  //产品标识
  productFrag: getStore({name: 'PRODUCTFRAG'}) || -1,
  //海关数据当前高亮
  oceanFrag: getStore({name: 'OCEANFRAG'}) || 0,
}
